package com.wpml.common.exception;

/**
 * @Auther: wangpei
 * @Date: 2019/5/27
 * @Description: 自定义异常
 */
public class CustomException extends RuntimeException {

    private String msg;
    private Integer code;

    public CustomException(String msg){
        super(msg);
        this.msg = msg;
        this.code = 500;
    }

    public CustomException(String msg, Integer code) {
        super(msg);
        this.msg = msg;
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
